use sqlx::postgres::PgPoolOptions;


pub async fn get_pool()->sqlx::Pool<sqlx::Postgres>{
    let db_connection_str ="postgres://wangy:wang203015@localhost/sqlx_demo".to_string();

    let pool = PgPoolOptions::new()
    .max_connections(5)
    .connect(&db_connection_str)
    .await
    .expect("can connect to database");
    return pool;
}


